mockseries.transition.lambda_transition
#
LambdaTransitionTransition from any transition function.
The transition from the base value to the switch value takes a given time: a transition window. On this given time, the change follows a given transition function. A transition function is defined on 0-1 and represent the change behaviour (eg linear, exponential, etc...).
If not provided, the stop window is considered 0, and the change is direct. If a stop window is provided without stop function, the stop function is defaulted to the symmetric of the transition function.
Arguments:
transition_window
- Time taken to transition.transition_function
- Transition function defined on 0-1, witht(0)=0
andt(1)=1
.stop_window
- Time taken to stop, ie transition to original value.stop_function
- Stop transition function defined on 0-1, withs(0)=0
ands(1)=1
.
Examples:
#
get_maskReturns the transition mask.